public class YuanZhu {
    double r;
    int gao;
    double pi = 3.14;
    double tiji;
    private void Dimianji() {

        System.out.println("底面积=" + r * pi * pi);
    }

    private void show() {
        tiji=r*pi*pi*gao;
        System.out.println("半径=" + r);
        System.out.println("高=" + gao);
        System.out.println("体积="+tiji);
    }

    public static void main(String[] args){
        YuanZhu y=new YuanZhu();
        y.r=2.5;
        y.gao=5;
        y.Dimianji();
        y.show();
    }
}
